#include "../head/server.h"

int pwd_work(int net_fd, char *user_name, MYSQL *mysql) {
	char *path = get_current_path_by_username(mysql, user_name);
	train_t train;
	bzero(&train, sizeof(train));
	train.length = strlen(path);
	memcpy(train.data, path, train.length);
	send(net_fd, &train, sizeof(train.length) + train.length, MSG_NOSIGNAL);
	free(path);
	return 0;
}